package com.orientsec.autotest.project.system.targetstruct.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.orientsec.autotest.project.system.targetstruct.mapper.TargetstructMapper;
import com.orientsec.autotest.project.system.targetstruct.domain.Targetstruct;
import com.orientsec.autotest.project.system.targetstruct.service.ITargetstructService;
import com.orientsec.autotest.common.utils.text.Convert;

/**
 * 目标文件结构配置 服务层实现
 * 
 * @author autotest
 * @date 2019-12-27
 */
@Service
public class TargetstructServiceImpl implements ITargetstructService 
{
	@Autowired
	private TargetstructMapper targetstructMapper;

	/**
     * 查询目标文件结构配置信息
     * 
     * @param id 目标文件结构配置ID
     * @return 目标文件结构配置信息
     */
    @Override
	public Targetstruct selectTargetstructById(Integer id)
	{
	    return targetstructMapper.selectTargetstructById(id);
	}
	
	/**
     * 查询目标文件结构配置列表
     * 
     * @param targetstruct 目标文件结构配置信息
     * @return 目标文件结构配置集合
     */
	@Override
	public List<Targetstruct> selectTargetstructList(Targetstruct targetstruct)
	{
	    return targetstructMapper.selectTargetstructList(targetstruct);
	}
	
    /**
     * 新增目标文件结构配置
     * 
     * @param targetstruct 目标文件结构配置信息
     * @return 结果
     */
	@Override
	public int insertTargetstruct(Targetstruct targetstruct)
	{
	    return targetstructMapper.insertTargetstruct(targetstruct);
	}
	
	/**
     * 修改目标文件结构配置
     * 
     * @param targetstruct 目标文件结构配置信息
     * @return 结果
     */
	@Override
	public int updateTargetstruct(Targetstruct targetstruct)
	{
	    return targetstructMapper.updateTargetstruct(targetstruct);
	}

	/**
     * 删除目标文件结构配置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteTargetstructByIds(String ids)
	{
		return targetstructMapper.deleteTargetstructByIds(Convert.toStrArray(ids));
	}
	
}
